package com.tale.ssm.vo;

public class Page {
	private int page;
	
	private int rows;
	
	private int offset;
	
	@Override
	public String toString() {
		return "Page [page=" + page + ", rows=" + rows + ", offset=" + offset + "]";
	}

	public int getPage() {
		return page;
	}

	public Page() {
		super();
	}

	public Page(int page, int rows, int offset) {
		super();
		this.page = page;
		this.rows = rows;
		this.offset = offset;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public int getOffset() {
		this.offset = (page -1)*rows;
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = (page -1)*rows;
	}
}
